package com.geek.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;
import java.io.StringWriter;

public class MessageTag extends SimpleTagSupport {
  StringWriter sw = new StringWriter();

  @Override
  public void doTag() throws JspException, IOException {
    getJspBody().invoke(sw);
    JspWriter out = getJspContext().getOut();
    out.print(sw.toString());
  }
}
